/**
 * 实训室耗材申请 api 封装
 *
 * @Author:    李韵妍
 * @Date:      2024-11-08 13:31:04
 * @Copyright  🐂🐎bloc
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const equipmentBorrowApplicationApi = {

  /**
   * 分页查询  @author  李韵妍
   */
  queryPage : (param) => {
    return postRequest('/equipmentBorrowApplication/queryPage', param);
  },

  /**
   * 增加  @author  李韵妍
   */
  add: (param) => {
      return postRequest('/equipmentBorrowApplication/add', param);
  },

  /**
   * 修改  @author  李韵妍
   */
  update: (param) => {
      return postRequest('/equipmentBorrowApplication/update', param);
  },


  /**
   * 删除  @author  李韵妍
   */
  delete: (id) => {
      return getRequest(`/equipmentBorrowApplication/delete/${id}`);
  },

  /**
   * 批量删除  @author  李韵妍
   */
  batchDelete: (idList) => {
      return postRequest('/equipmentBorrowApplication/batchDelete', idList);
  },

    /**
     * 所有设备  @author  李韵妍
     */
    getAllEquipment: (param) => {
        return getRequest(`/equipmentManage/queryEquipment/${param}`);
    },

    /**
     * 审批  @author  李韵妍
     */
    approval: (param) => {
        return postRequest('/equipmentBorrowApplication/approve', param);
    },

    /**
     * 归还  @author  李韵妍
     */
    returnEquipment: (param) => {
        return postRequest('/equipmentBorrowApplication/return', param);
    },

    /**
     * 归还审批  @author  李韵妍
     */
    returnApproval: (id) => {
        return getRequest(`/equipmentBorrowApplication/returnAdmin/${id}`);
    },

};
